package ltd.dujiabao.myrule;

import com.netflix.loadbalancer.IRule;
import com.netflix.loadbalancer.RandomRule;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.util.Random;

/**
 * @author : DuJiabao
 * @Project : springcloud
 * @Time : 2021/5/22 16:43
 * @Desc :
 */
@Configuration
public class MyRule {
  @Bean
  public IRule rule() {
    return new RandomRule();
  }
}
